Optimal. Leaf size=81 \[ \frac{(-1)^{3/4} \sqrt{d} \tan ^{-1}\left (\frac{(-1)^{3/4} \sqrt{d \tan (e+f x)}}{\sqrt{d}}\right )}{2 a f}+\frac{i \sqrt{d \tan (e+f x)}}{2 f (a+i a \tan (e+f x))} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.11878, antiderivative size = 81, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.107, Rules used = {3549, 3533, 205} \[ \frac{(-1)^{3/4} \sqrt{d} \tan ^{-1}\left (\frac{(-1)^{3/4} \sqrt{d \tan (e+f x)}}{\sqrt{d}}\right )}{2 a f}+\frac{i \sqrt{d \tan (e+f x)}}{2 f (a+i a \tan (e+f x))} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3549
Rule 3533
Rule 205
Rubi steps
\begin{align*} \int \frac{\sqrt{d \tan (e+f x)}}{a+i a \tan (e+f x)} \, dx &=\frac{i \sqrt{d \tan (e+f x)}}{2 f (a+i a \tan (e+f x))}-\frac{\int \frac{\frac{1}{2} i a d^2-\frac{1}{2} a d^2 \tan (e+f x)}{\sqrt{d \tan (e+f x)}} \, dx}{2 a^2 d}\\ &=\frac{i \sqrt{d \tan (e+f x)}}{2 f (a+i a \tan (e+f x))}+\frac{d^3 \operatorname{Subst}\left (\int \frac{1}{\frac{1}{2} i a d^3+\frac{1}{2} a d^2 x^2} \, dx,x,\sqrt{d \tan (e+f x)}\right )}{4 f}\\ &=\frac{(-1)^{3/4} \sqrt{d} \tan ^{-1}\left (\frac{(-1)^{3/4} \sqrt{d \tan (e+f x)}}{\sqrt{d}}\right )}{2 a f}+\frac{i \sqrt{d \tan (e+f x)}}{2 f (a+i a \tan (e+f x))}\\ \end{align*}
Mathematica [A] time = 1.02128, size = 129, normalized size = 1.59 \[ \frac{\sqrt{d \tan (e+f x)} \left (\sqrt{i \tan (e+f x)}+(-1-i \tan (e+f x)) \tanh ^{-1}\left (\sqrt{\frac{-1+e^{2 i (e+f x)}}{1+e^{2 i (e+f x)}}}\right )\right )}{2 a f \sqrt{\frac{-1+e^{2 i (e+f x)}}{1+e^{2 i (e+f x)}}} (\tan (e+f x)-i)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.054, size = 69, normalized size = 0.9 \begin{align*}{\frac{d}{2\,fa \left ( -id+d\tan \left ( fx+e \right ) \right ) }\sqrt{d\tan \left ( fx+e \right ) }}+{\frac{d}{2\,fa}\arctan \left ({\sqrt{d\tan \left ( fx+e \right ) }{\frac{1}{\sqrt{id}}}} \right ){\frac{1}{\sqrt{id}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.97219, size = 807, normalized size = 9.96 \begin{align*} \frac{{\left (a f \sqrt{\frac{i \, d}{4 \, a^{2} f^{2}}} e^{\left (2 i \, f x + 2 i \, e\right )} \log \left ({\left ({\left (4 i \, a f e^{\left (2 i \, f x + 2 i \, e\right )} + 4 i \, a f\right )} \sqrt{\frac{-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt{\frac{i \, d}{4 \, a^{2} f^{2}}} - 2 i \, d e^{\left (2 i \, f x + 2 i \, e\right )}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}\right ) - a f \sqrt{\frac{i \, d}{4 \, a^{2} f^{2}}} e^{\left (2 i \, f x + 2 i \, e\right )} \log \left ({\left ({\left (-4 i \, a f e^{\left (2 i \, f x + 2 i \, e\right )} - 4 i \, a f\right )} \sqrt{\frac{-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt{\frac{i \, d}{4 \, a^{2} f^{2}}} - 2 i \, d e^{\left (2 i \, f x + 2 i \, e\right )}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}\right ) + \sqrt{\frac{-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}{\left (i \, e^{\left (2 i \, f x + 2 i \, e\right )} + i\right )}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{4 \, a f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: AttributeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.16613, size = 149, normalized size = 1.84 \begin{align*} \frac{1}{2} \, d^{2}{\left (\frac{\sqrt{2} \arctan \left (\frac{16 \, \sqrt{d^{2}} \sqrt{d \tan \left (f x + e\right )}}{8 i \, \sqrt{2} d^{\frac{3}{2}} + 8 \, \sqrt{2} \sqrt{d^{2}} \sqrt{d}}\right )}{a d^{\frac{3}{2}} f{\left (\frac{i \, d}{\sqrt{d^{2}}} + 1\right )}} + \frac{\sqrt{d \tan \left (f x + e\right )}}{{\left (d \tan \left (f x + e\right ) - i \, d\right )} a d f}\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]